package responsibility;

public class Main {
    public static void main(String[] args) {

        //先建立链式关系
        Handler h1 = new Handler1();
        Handler h2 = new Handler2();
        Handler h3 = new Handler3();
        h1.nextHandler = h2;
        h2.nextHandler = h3;

        AbstractRequest request3 = new Request3("request3 请求....");
        h1.handleRequest(request3);
    }
}
